#ifndef _BLOC_MANAGER_H_
# define _BLOC_MANAGER_H_

# include "Bloc.h"
# include "Sprites.h"
# include "Utils\\Rect.h"
# include <string>
# include <map>
# include <vector>

class BlocManager
{
private:
	Sprites m_sprites;
	std::map<std::string, Bloc*> m_originalBlocs;
	std::map<std::string, std::vector<Bloc*> > m_blocs;

public:
	BlocManager();
	~BlocManager();

	void Add(std::string const& _type, SDL::UTILS::Rect const& _position);
	void AddOriginal(std::string const& _type);
	bool Remove(Bloc* _bloc);
	bool Remove(std::string const& _type, Bloc* _bloc);
	void Clear();
	void ClearOriginals();
	void Draw(SDL_Surface* _screen);
	Bloc* Find(std::string const& _type);
	Bloc* GetAt(Sint16 _x, Sint16 _y);
	std::map<std::string, Bloc*>& GetOriginals();
	void GetOriginals(std::vector<Bloc*>& _dst);
	std::map<std::string, std::vector<Bloc*> >& GetBlocs();
	void GetBlocs(std::string const& _type, std::vector<Bloc*>& _dst);
	void GetAllBlocs(std::vector<Bloc*>& _dst);
	Sprites& GetSprites();
};

#endif // _BLOC_MANAGER_H_
